home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6347 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 72 65 | 64 2e 77 65 65 67 2e 75 |Path: re|d.weeg.u|
|00000010| 69 6f 77 61 2e 65 64 75 | 21 72 6f 62 69 6e 73 6f |iowa.edu|!robinso|
|00000020| 6e 0a 46 72 6f 6d 3a 20 | 54 68 65 20 41 6d 6f 72 |n.From: |The Amor|
|00000030| 70 68 6f 75 73 20 4d 61 | 73 73 20 3c 72 6f 62 69 |phous Ma|ss <robi|
|00000040| 6e 73 6f 6e 40 62 6c 75 | 65 2e 77 65 65 67 2e 75 |nson@blu|e.weeg.u|
|00000050| 69 6f 77 61 2e 65 64 75 | 3e 0a 4e 65 77 73 67 72 |iowa.edu|>.Newsgr|
|00000060| 6f 75 70 73 3a 20 63 6f | 6d 70 2e 6c 61 6e 67 2e |oups: co|mp.lang.|
|00000070| 63 0a 53 75 62 6a 65 63 | 74 3a 20 52 65 3a 20 48 |c.Subjec|t: Re: H|
|00000080| 45 4c 50 3a 20 49 6c 6c | 65 67 61 6c 20 50 6f 69 |ELP: Ill|egal Poi|
|00000090| 6e 74 65 72 20 41 72 69 | 74 68 6d 65 74 69 63 0a |nter Ari|thmetic.|
|000000a0| 44 61 74 65 3a 20 46 72 | 69 2c 20 32 33 20 46 65 |Date: Fr|i, 23 Fe|
|000000b0| 62 20 31 39 39 36 20 32 | 30 3a 35 31 3a 35 37 20 |b 1996 2|0:51:57 |
|000000c0| 2d 30 36 30 30 0a 4f 72 | 67 61 6e 69 7a 61 74 69 |-0600.Or|ganizati|
|000000d0| 6f 6e 3a 20 55 6e 69 76 | 65 72 73 69 74 79 20 6f |on: Univ|ersity o|
|000000e0| 66 20 49 6f 77 61 2c 20 | 49 6f 77 61 20 43 69 74 |f Iowa, |Iowa Cit|
|000000f0| 79 2c 20 49 41 2c 20 55 | 53 41 0a 44 69 73 74 72 |y, IA, U|SA.Distr|
|00000100| 69 62 75 74 69 6f 6e 3a | 20 77 6f 72 6c 64 0a 4d |ibution:| world.M|
|00000110| 65 73 73 61 67 65 2d 49 | 44 3a 20 3c 50 69 6e 65 |essage-I|D: <Pine|
|00000120| 2e 41 33 32 2e 33 2e 39 | 31 2e 39 36 30 32 32 33 |.A32.3.9|1.960223|
|00000130| 32 30 34 36 33 33 2e 31 | 36 32 39 32 31 41 2d 31 |204633.1|62921A-1|
|00000140| 30 30 30 30 30 40 72 65 | 64 2e 77 65 65 67 2e 75 |00000@re|d.weeg.u|
|00000150| 69 6f 77 61 2e 65 64 75 | 3e 0a 52 65 66 65 72 65 |iowa.edu|>.Refere|
|00000160| 6e 63 65 73 3a 20 3c 34 | 67 6a 30 75 67 24 37 33 |nces: <4|gj0ug$73|
|00000170| 30 40 6e 65 77 73 2e 6f | 6e 65 2e 6e 65 74 3e 0a |0@news.o|ne.net>.|
|00000180| 4e 4e 54 50 2d 50 6f 73 | 74 69 6e 67 2d 48 6f 73 |NNTP-Pos|ting-Hos|
|00000190| 74 3a 20 72 65 64 2e 77 | 65 65 67 2e 75 69 6f 77 |t: red.w|eeg.uiow|
|000001a0| 61 2e 65 64 75 0a 4d 69 | 6d 65 2d 56 65 72 73 69 |a.edu.Mi|me-Versi|
|000001b0| 6f 6e 3a 20 31 2e 30 0a | 43 6f 6e 74 65 6e 74 2d |on: 1.0.|Content-|
|000001c0| 54 79 70 65 3a 20 54 45 | 58 54 2f 50 4c 41 49 4e |Type: TE|XT/PLAIN|
|000001d0| 3b 20 63 68 61 72 73 65 | 74 3d 55 53 2d 41 53 43 |; charse|t=US-ASC|
|000001e0| 49 49 0a 58 2d 53 65 6e | 64 65 72 3a 20 72 6f 62 |II.X-Sen|der: rob|
|000001f0| 69 6e 73 6f 6e 40 72 65 | 64 2e 77 65 65 67 2e 75 |inson@re|d.weeg.u|
|00000200| 69 6f 77 61 2e 65 64 75 | 0a 49 6e 2d 52 65 70 6c |iowa.edu|.In-Repl|
|00000210| 79 2d 54 6f 3a 20 3c 34 | 67 6a 30 75 67 24 37 33 |y-To: <4|gj0ug$73|
|00000220| 30 40 6e 65 77 73 2e 6f | 6e 65 2e 6e 65 74 3e 20 |0@news.o|ne.net> |
|00000230| 0a 0a 4f 6e 20 32 33 20 | 46 65 62 20 31 39 39 36 |..On 23 |Feb 1996|
|00000240| 2c 20 4f 72 65 6e 20 4c | 65 76 69 6e 20 77 72 6f |, Oren L|evin wro|
|00000250| 74 65 3a 0a 0a 3e 20 49 | 20 77 61 73 20 77 6f 6e |te:..> I| was won|
|00000260| 64 65 72 69 6e 67 20 69 | 66 20 73 6f 6d 65 6f 6e |dering i|f someon|
|00000270| 65 20 63 6f 75 6c 64 20 | 68 65 6c 70 20 6d 65 2e |e could |help me.|
|00000280| 20 49 27 6d 20 69 6e 20 | 74 68 65 20 6d 69 64 73 | I'm in |the mids|
|00000290| 74 20 6f 66 20 6c 65 61 | 72 6e 69 6e 67 0a 3e 20 |t of lea|rning.> |
|000002a0| 43 2f 43 2b 2b 20 61 6e | 64 20 61 6d 20 74 72 79 |C/C++ an|d am try|
|000002b0| 69 6e 67 20 74 6f 20 70 | 72 6f 67 72 61 6d 20 74 |ing to p|rogram t|
|000002c0| 68 65 20 65 78 61 6d 70 | 6c 65 73 20 69 6e 20 41 |he examp|les in A|
|000002d0| 6e 64 72 65 77 20 42 69 | 72 6e 73 74 6f 63 6b 20 |ndrew Bi|rnstock |
|000002e0| 61 6e 64 20 4a 6f 68 6e | 0a 3e 20 52 65 78 27 73 |and John|.> Rex's|
|000002f0| 20 62 6f 6f 6b 20 22 50 | 72 61 63 74 69 63 61 6c | book "P|ractical|
|00000300| 20 41 6c 67 6f 72 69 74 | 68 79 6d 73 20 66 6f 72 | Algorit|hyms for|
|00000310| 20 50 72 6f 67 72 61 6d | 65 72 73 2e 22 20 49 20 | Program|ers." I |
|00000320| 61 6d 20 75 73 69 6e 67 | 20 53 79 6d 65 6e 74 65 |am using| Symente|
|00000330| 63 27 73 0a 3e 20 54 68 | 69 6e 6b 20 43 2b 2b 20 |c's.> Th|ink C++ |
|00000340| 28 76 20 36 20 2d 20 4d | 61 63 29 2e 0a 3e 20 54 |(v 6 - M|ac)..> T|
|00000350| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 63 6f 64 |he follo|wing cod|
|00000360| 65 20 69 73 20 67 69 76 | 69 6e 67 20 6d 65 20 61 |e is giv|ing me a|
|00000370| 20 22 69 6c 6c 65 67 61 | 6c 20 70 6f 69 6e 74 65 | "illega|l pointe|
|00000380| 72 20 61 72 69 74 68 6d | 65 74 69 63 22 20 65 72 |r arithm|etic" er|
|00000390| 72 6f 72 2e 0a 3e 20 49 | 27 6d 20 74 72 79 69 6e |ror..> I|'m tryin|
|000003a0| 67 20 74 6f 20 73 74 72 | 69 70 20 74 68 65 20 63 |g to str|ip the c|
|000003b0| 61 72 72 61 67 65 20 72 | 65 74 75 72 6e 20 6f 66 |arrage r|eturn of|
|000003c0| 66 20 6f 66 20 61 20 6c | 69 6e 65 20 6f 66 20 74 |f of a l|ine of t|
|000003d0| 65 78 74 20 72 65 61 64 | 20 66 72 6f 6d 20 61 0a |ext read| from a.|
|000003e0| 3e 20 66 69 6c 65 2e 0a | 0a 3e 20 09 09 77 68 69 |> file..|.> ..whi|
|000003f0| 6c 65 20 28 21 20 66 65 | 6f 66 20 28 66 69 6e 29 |le (! fe|of (fin)|
|00000400| 29 0a 0a 20 20 54 68 69 | 73 20 69 73 20 6e 6f 74 |).. Thi|s is not|
|00000410| 20 67 6f 69 6e 67 20 74 | 6f 20 64 6f 20 71 75 69 | going t|o do qui|
|00000420| 74 65 20 77 68 61 74 20 | 79 6f 75 20 77 61 6e 74 |te what |you want|
|00000430| 20 69 74 20 74 6f 2e 20 | 20 66 65 6f 66 28 29 20 | it to. | feof() |
|00000440| 63 68 65 63 6b 73 20 69 | 66 20 0a 74 68 65 20 5f |checks i|f .the _|
|00000450| 6c 61 73 74 5f 20 72 65 | 61 64 20 61 63 63 65 73 |last_ re|ad acces|
|00000460| 73 20 68 69 74 20 45 4f | 46 2c 20 73 6f 20 69 74 |s hit EO|F, so it|
|00000470| 20 77 6f 6e 27 74 20 63 | 61 74 63 68 20 45 4f 46 | won't c|atch EOF|
|00000480| 20 75 6e 74 69 6c 20 79 | 6f 75 27 76 65 20 0a 72 | until y|ou've .r|
|00000490| 65 61 64 20 70 61 73 74 | 20 69 74 20 61 6e 64 20 |ead past| it and |
|000004a0| 74 72 69 65 64 20 74 6f | 20 70 72 6f 63 65 73 73 |tried to| process|
|000004b0| 20 69 74 21 0a 0a 20 20 | 75 73 65 20 20 20 20 20 | it!.. |use |
|000004c0| 20 20 20 20 20 20 77 68 | 69 6c 65 20 28 66 67 65 | wh|ile (fge|
|000004d0| 74 73 28 62 75 66 66 65 | 72 2c 20 73 69 7a 65 6f |ts(buffe|r, sizeo|
|000004e0| 66 20 62 75 66 66 65 72 | 2c 20 66 69 6e 29 0a 0a |f buffer|, fin)..|
|000004f0| 3e 20 09 09 09 2f 2a 20 | 67 65 74 20 72 69 64 20 |> .../* |get rid |
|00000500| 6f 66 20 74 68 65 20 74 | 72 61 69 6c 69 6e 67 20 |of the t|railing |
|00000510| 63 61 72 72 61 67 65 20 | 72 65 74 75 72 6e 20 2a |carrage |return *|
|00000520| 2f 0a 3e 20 09 09 09 62 | 75 66 66 65 72 20 5b 73 |/.> ...b|uffer [s|
|00000530| 74 72 6c 65 6e 20 28 62 | 75 66 66 65 72 29 20 2d |trlen (b|uffer) -|
|00000540| 20 31 5d 20 3d 20 22 5c | 30 22 3b 0a 0a 20 20 48 | 1] = "\|0";.. H|
|00000550| 65 72 65 27 73 20 79 6f | 75 72 20 70 72 6f 62 6c |ere's yo|ur probl|
|00000560| 65 6d 2e 20 20 59 6f 75 | 27 72 65 20 63 6f 6d 70 |em. You|'re comp|
|00000570| 61 72 69 6e 67 20 61 20 | 63 68 61 72 20 28 62 75 |aring a |char (bu|
|00000580| 66 66 65 72 5b 78 5d 29 | 20 74 6f 20 61 20 70 6f |ffer[x])| to a po|
|00000590| 69 6e 74 65 72 20 0a 74 | 6f 20 63 68 61 72 20 28 |inter .t|o char (|
|000005a0| 74 68 65 20 74 79 70 65 | 20 6f 66 20 61 20 73 74 |the type| of a st|
|000005b0| 72 69 6e 67 20 6c 69 74 | 65 72 61 6c 20 69 6e 20 |ring lit|eral in |
|000005c0| 61 6e 20 65 78 70 72 65 | 73 73 69 6f 6e 29 2e 20 |an expre|ssion). |
|000005d0| 20 49 66 20 79 6f 75 20 | 63 68 61 6e 67 65 20 74 | If you |change t|
|000005e0| 68 61 74 20 0a 6c 69 6e | 65 20 74 6f 0a 0a 20 20 |hat .lin|e to.. |
|000005f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000600| 20 20 20 20 20 20 62 75 | 66 66 65 72 5b 73 74 72 | bu|ffer[str|
|00000610| 6c 65 6e 28 62 75 66 66 | 65 72 29 20 2d 20 31 5d |len(buff|er) - 1]|
|00000620| 20 3d 20 27 5c 30 27 3b | 0a 0a 20 20 74 68 65 72 | = '\0';|.. ther|
|00000630| 65 62 79 20 63 6f 6d 70 | 61 72 69 6e 67 20 61 20 |eby comp|aring a |
|00000640| 63 68 61 72 20 74 6f 20 | 61 6e 20 69 6e 74 20 28 |char to |an int (|
|00000650| 77 68 69 63 68 20 69 73 | 20 70 65 72 66 65 63 74 |which is| perfect|
|00000660| 6c 79 20 6c 65 67 61 6c | 20 69 6e 20 43 29 2c 20 |ly legal| in C), |
|00000670| 79 6f 75 72 20 0a 70 72 | 6f 67 72 61 6d 20 77 69 |your .pr|ogram wi|
|00000680| 6c 6c 20 77 6f 72 6b 20 | 61 73 20 65 78 70 65 63 |ll work |as expec|
|00000690| 74 65 64 2e 0a 0a 2f 2a | 2a 4a 61 6d 65 73 20 52 |ted.../*|*James R|
|000006a0| 6f 62 69 6e 73 6f 6e 2a | 2a 2a 2a 2a 2a 2a 2a 2a |obinson*|********|
|000006b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 20 20 |********|****** |
|000006c0| 20 20 20 20 20 20 20 20 | 20 20 0a 20 20 22 41 6e | | . "An|
|000006d0| 20 69 6d 70 6f 72 74 61 | 6e 74 20 67 6f 61 6c 20 | importa|nt goal |
|000006e0| 6f 66 20 61 6c 6d 6f 73 | 74 20 65 76 65 72 79 20 |of almos|t every |
|000006f0| 67 72 61 70 68 69 63 73 | 20 70 72 6f 67 72 61 6d |graphics| program|
|00000700| 20 69 73 20 74 6f 20 64 | 72 61 77 20 70 69 63 74 | is to d|raw pict|
|00000710| 75 72 65 73 20 6f 6e 0a | 20 74 68 65 20 73 63 72 |ures on.| the scr|
|00000720| 65 65 6e 2e 22 20 20 20 | 20 2d 2d 20 4e 65 69 64 |een." | -- Neid|
|00000730| 65 72 2c 20 44 61 76 69 | 73 20 26 20 57 6f 6f 2c |er, Davi|s & Woo,|
|00000740| 20 5f 4f 70 65 6e 47 4c | 5f 50 72 6f 67 72 61 6d | _OpenGL|_Program|
|00000750| 6d 69 6e 67 5f 47 75 69 | 64 65 5f 2c 20 43 68 61 |ming_Gui|de_, Cha|
|00000760| 70 74 65 72 20 31 30 0a | 20 20 20 20 20 20 20 20 |pter 10.| |
|00000770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2a | | *|
|00000790| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 6a 61 6d 65 |********|****jame|
|000007a0| 73 2d 72 6f 62 69 6e 73 | 6f 6e 40 75 69 6f 77 61 |s-robins|on@uiowa|
|000007b0| 2e 65 64 75 2a 2a 2f 0a | |.edu**/.| |
+--------+-------------------------+-------------------------+--------+--------+